<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>搜索用户</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/st/back/css/base.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/st/back/css/iconfont.css">
    <script type="text/javascript" src="${pageContext.servletContext.contextPath}/st/front/JS/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/st/back/layui/css/layui.css">
    <script type="text/javascript" src="${pageContext.servletContext.contextPath}/st/back/layui/layui.js"></script>
    <!-- 滚动条插件 -->
    <link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/st/back/css/jquery.mCustomScrollbar.css">
</head>

<body>
<div class="cBody">
    <table class="layui-table">
        <thead>
        <tr>
            <th>用户名</th>
            <th>手机号</th>
            <th>性别</th>
            <th>生日</th>
            <th>最近登陆时间</th>
            <th>用户账号状态</th>
            <th>是否冻结</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${page.list}" var="users">
            <tr>
                <td>${users.uname}</td>
                <td>${users.pnumber}</td>
                <td>${users.sex}</td>
                <td>${users.birthday}</td>
                <td><fmt:formatDate value="${users.login_time}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                <td>
                    <c:if test="${users.frozen==1}">
                        已冻结
                    </c:if>
                    <c:if test="${users.frozen==0}">
                        正常使用
                    </c:if>
                </td>
                <td>
                    <c:if test="${users.frozen==1}">
                        <a class="layui-btn layui-btn-xs" href="${pageContext.servletContext.contextPath}/Feozen?uid=${users.uid}&state=0">解封</a>
                    </c:if>
                    <c:if test="${users.frozen==0}">
                        <a class="layui-btn layui-btn-xs" href="${pageContext.servletContext.contextPath}/Feozen?uid=${users.uid}&state=1">冻结</a>
                    </c:if>
                </td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
    <!--分页-->
    <!-- layUI 分页模块 -->
    <div id="pages" style="text-align: center">
        <!--显示页数-->
        <c:forEach var="pageNo" items="${page.navigatepageNums}">
            <c:choose>
                <c:when test="${pageNo == page.pageNum}">
                    <span class="numbers current" data-v-0acc30d3="">${pageNo}</span>
                </c:when>
                <c:otherwise>
                    <a class="numbers" data-v-0acc30d3="" href="${pageContext.servletContext.contextPath}/findUser?currentPageNo=${pageNo}" stat_exposure="true">${pageNo}</a>
                </c:otherwise>
            </c:choose>
        </c:forEach>
    </div>

</div>
</body>
</html>
